Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lane-switch): block switching a lane when on main and there are staging components #6981

Merged
merged 3 commits into from
Jan 31, 2023

Conversation

davidfirst
Copy link
Member

This fixes a bug found in the following scenario:
A component has a different scope than the lane. It was snapped on main, as a result, the head prop of the Component model has changed locally. Later, the lane was switched to a local lane, running bit export threw the following error:

unexpected network error has occurred.
server responded with: "scope "teambit.webpack". error: head snap a4197234768854dea33ff782e4de7196b4d0d496 was not found for a component learnbit-react.module-federation/apps/remote-app"

It happened because the remote-scope of the lane got the component object with a head that only exists locally.
It's not easy to fix this issue and it could happen only when switching from main to another lane. not from one lane to another. so for now, we just block it. Later, we might support it somehow.

@davidfirst davidfirst merged commit 5eb5155 into master Jan 31, 2023
@davidfirst davidfirst deleted the block-staged-main-switch branch January 31, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants